﻿using YMJF_Service.Common;
using YMJF_Service.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace YMJF_Service.Service
{
    public static class AccountSrv
    {
        public static string salt = "xwxelxwhkiszxjzssaikxid";

        #region 获取后几位数 public string GetLastStr(string str,int num)
        /// <summary>
        /// 获取后几位数
        /// </summary>
        /// <param name="str">要截取的字符串</param>
        /// <param name="num">返回的具体位数</param>
        /// <returns>返回结果的字符串</returns>
        public static string GetLastStr(string str, int num)
        {
            int count = 0;
            if (str.Length > num)
            {
                count = str.Length - num;
                str = str.Substring(count, num);
            }
            return str;
        }
        #endregion

        /// <summary>
        /// 密码MD5加密存储
        /// </summary>
        /// <param name="Pwd"></param>
        /// <returns></returns>
        public static string MD5Encrypt(string Pwd)
        {
            return Help.MD5Encrypt(salt + Pwd);
        }


    }
}